package com.prepowers.cake.web.interceptor;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

public class AuthUser extends User{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3048572215914792056L;
	private String salt;
	
	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public AuthUser(String username, String password,String salt, boolean enabled, boolean accountNonExpired,
			boolean credentialsNonExpired, boolean accountNonLocked,
			Collection<? extends GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
		this.salt = salt;
	}
	
	public AuthUser(String username, String password,String salt,
			Collection<? extends GrantedAuthority> authorities) {
		this(username, password,salt, true, true, true, true, authorities);
	}
}
